const { defineConfig } = require('@vue/cli-service')
require("webpack");
module.exports = defineConfig({

  transpileDependencies: true,
  lintOnSave:false,  //关闭语法检查
  devServer: {
    port: 8081,
    open: false,
},
pages: {

    app: {
        entry: ['./src/view/home/main.js'],
        template: './src/view/home/index.html',
        filename: "index.html",
        title: "首页",

    },
    publish:{
        entry: ['./src/view/publish/main.js'],
        template: './src/view/publish/publish.html',
        filename: "publish.html",
        title: "发布",
    },
    creationCenter:{
        entry: ['./src/view/creationCenter/main.js'],
        template: './src/view/creationCenter/creationCenter.html',
        filename: "creationCenter.html",
        title: "创作中心",
    },
    articleDetail:{
        entry: ['./src/view/articleDetail/main.js'],
        template: './src/view/articleDetail/articleDetail.html',
        filename: "articleDetail.html",
        title: "title",
    },
    userCenter:{
        entry: ['./src/view/userCenter/main.js'],
        template: './src/view/userCenter/userCenter.html',
        filename: "userCenter.html",
        title: "个人中心",
    },
    login:{
        entry: ['./src/view/login/main.js'],
        template: './src/view/login/login.html',
        filename: "login.html",
        title: "登录界面",
    },
    search:{
        entry: ['./src/view/search/main.js'],
        template: './src/view/search/search.html',
        filename: "search.html",
        title: "搜索界面",
    },

},
//markdown 读配置
    chainWebpack: config => {
      config.module.rule('md')
        .test(/\.md/)
        .use('vue-loader')
        .loader('vue-loader')
        .end()
        .use('vue-markdown-loader')
        .loader('vue-markdown-loader/lib/markdown-compiler')
        .options({
          raw: true
        })
    }




})
